﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;

namespace A2DFramework.Infrastructure.Mvc.Extentions
{
    public static class NumbericExtentions
    {
        public static SelectList ToMonthsSelectList(this HtmlHelper h, int selectedMonth)
        {
            Dictionary<string, string> pairs = new Dictionary<string, string>();
            for (int i = 0; i < 12; i++)
                pairs.Add((i + 1).ToString(), (i + 1).ToString());
            return new SelectList(pairs, "Key", "Value", selectedMonth);
        }
    }
}
